package Secondweek;

import java.util.Scanner;

public class worktwo {
    public static void main(String[] args) {
        int[] sum = new int[5];
        Scanner scanner = new Scanner(System.in);
        System.out.println("----------请输入五个数------------");
        for (int i=0;i< sum.length;i++){
            System.out.println("请输入第"+(i+1)+"个数");
            sum[i] = scanner.nextInt();
        }
        int max=sum[0];
        for (int i =1;i<sum.length;i++){
            if (max<sum[i])
                max=sum[i];
        }
        System.out.println("max="+max);
        int min=sum[0];
        for (int i =1;i<sum.length;i++){
            if (min>sum[i])
                min=sum[i];
        }
        System.out.println("min="+min);


    }
}
